package model

const TableNameSpiderWord = "spider_word"
const PrimaryKeySpiderWord = "spider_word_id"

// SpiderWord 线报口令表
type SpiderWord struct {
	SpiderWordID   int32  `gorm:"column:spider_word_id;primaryKey;autoIncrement:true" json:"spider_word_id"`
	SpiderID       int32  `gorm:"column:spider_id;not null;comment:线报ID" json:"spider_id"`                 // 线报ID
	Word           string `gorm:"column:word;comment:口令" json:"word"`                                      // 口令
	ConvertGoodsID int32  `gorm:"column:convert_goods_id;not null;comment:商品转换ID" json:"convert_goods_id"` // 商品转换ID

	ConvertGoods ConvertGood `gorm:"references:ConvertGoodsID"`
}

// TableName SpiderWord's table name
func (*SpiderWord) TableName() string {
	return TableNameSpiderWord
}

// PrimaryKey SpiderWord's primary key
func (*SpiderWord) PrimaryKey() string {
	return PrimaryKeySpiderWord
}
